local hx__yeman = fk.CreateSkill {
  name = "hx__yeman",
  tags = { Skill.Compulsory, },
}

hx__yeman:addEffect(fk.AfterCardsMove, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    if not player:hasSkill(hx__yeman.name) or player.dead then return false end
    local cards = player.player_cards[Player.Hand]
    local names = {}
    for _, id in ipairs(cards) do
      table.insertIfNeed(names, Fk:getCardById(id).trueName)
    end
    if #names == #cards then
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local x = 2 * player.hp - player.maxHp
    player:drawCards(math.max(1, x), hx__yeman.name)
  end,
})

return hx__yeman